API Documentation
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
nkScripts::FunctionParameter Struct Referencefinal

A function parameter, used within the stack of arguments. More...

Public Member Functions

 FunctionParameter ()
 
 FunctionParameter (bool val)
 
 FunctionParameter (int val)
 
 FunctionParameter (float val)
 
 FunctionParameter (double val)
 
 FunctionParameter (const char *val)
 
 FunctionParameter (const nkMemory::StringView &val)
 
 FunctionParameter (void *val, const nkMemory::StringView &userTypeName, bool scriptOwner)
 
 FunctionParameter (const ScriptObjectReference &scriptObjectReference)
 
 FunctionParameter (const FunctionParameter &other)
 
 ~FunctionParameter ()
 
void prepareForInternalType ()
 
void prepareForString ()
 
void prepareForUserType ()
 
void prepareForScriptObjectReference ()
 
FunctionParameteroperator= (const FunctionParameter &other)
 

Public Attributes

union {
   bool   _valBool
 
   int   _valInt
 
   float   _valFloat
 
   double   _valDouble
 
   nkMemory::String   _valString
 
   UserTypeHolder   _valUser
 
   ScriptObjectReference   _valScriptObject
 
}; 
 
FUNCTION_PARAMETER_TYPE _type
 The actual type of the variable held.
 

Static Public Attributes

static FunctionParameter VOID
 

Detailed Description

A function parameter, used within the stack of arguments.

Constructor & Destructor Documentation

◆ FunctionParameter() [1/10]

nkScripts::FunctionParameter::FunctionParameter ( )

Default constructor.

◆ FunctionParameter() [2/10]

nkScripts::FunctionParameter::FunctionParameter ( bool  val)
explicit

Specific constructor.

Parameters
valThe value to assign.

◆ FunctionParameter() [3/10]

nkScripts::FunctionParameter::FunctionParameter ( int  val)
explicit

Specific constructor.

Parameters
valThe value to assign.

◆ FunctionParameter() [4/10]

nkScripts::FunctionParameter::FunctionParameter ( float  val)
explicit

Specific constructor.

Parameters
valThe value to assign.

◆ FunctionParameter() [5/10]

nkScripts::FunctionParameter::FunctionParameter ( double  val)
explicit

Specific constructor.

Parameters
valThe value to assign.

◆ FunctionParameter() [6/10]

nkScripts::FunctionParameter::FunctionParameter ( const char *  val)

Specific constructor.

Parameters
valThe value to assign.

◆ FunctionParameter() [7/10]

nkScripts::FunctionParameter::FunctionParameter ( const nkMemory::StringView val)

Specific constructor.

Parameters
valThe value to assign.

◆ FunctionParameter() [8/10]

nkScripts::FunctionParameter::FunctionParameter ( void *  val,
const nkMemory::StringView userTypeName,
bool  scriptOwner 
)

Specific constructor.

Parameters
valThe value to assign.
userTypeNameThe user type name of the object set.
scriptOwnerWhether the script is the owner of given object and should delete it upon garbage collection.

◆ FunctionParameter() [9/10]

nkScripts::FunctionParameter::FunctionParameter ( const ScriptObjectReference scriptObjectReference)

Specific constructor.

Parameters
scriptObjectReferenceThe reference to assign.

◆ FunctionParameter() [10/10]

nkScripts::FunctionParameter::FunctionParameter ( const FunctionParameter other)

Copy constructor.

Parameters
otherThe parameter to copy.

◆ ~FunctionParameter()

nkScripts::FunctionParameter::~FunctionParameter ( )

Destructor.

Member Function Documentation

◆ prepareForInternalType()

void nkScripts::FunctionParameter::prepareForInternalType ( )

Prepares internal memory layout for the type given.

◆ prepareForString()

void nkScripts::FunctionParameter::prepareForString ( )

Prepares internal memory layout for the type given.

◆ prepareForUserType()

void nkScripts::FunctionParameter::prepareForUserType ( )

Prepares internal memory layout for the type given.

◆ prepareForScriptObjectReference()

void nkScripts::FunctionParameter::prepareForScriptObjectReference ( )

Prepares internal memory layout for the type given.

◆ operator=()

FunctionParameter& nkScripts::FunctionParameter::operator= ( const FunctionParameter other)

Copy operator.

Parameters
otherThe parameter to copy.

Member Data Documentation

◆ @27

union { ... }

Union of all types possible to have.

◆ VOID

FunctionParameter nkScripts::FunctionParameter::VOID
static

Static parameter enabling a quick void parameter use.


The documentation for this struct was generated from the following file: